@echo off
setlocal enabledelayedexpansion

set sed=c:\dev\cmder\vendor\git-for-windows\usr\bin\sed.exe
set file=main.go

%swag init --parseDependency%
swag init

if "%~1"=="server" GOTO server

:local
%sed% -i 's/^\/\/ @host.*/\/\/ @host 127.0.0.1:7081/g' main.go
%sed% -i 's/^\/\/ @BasePath.*/\/\/ @BasePath \//g' main.go

goto exit

:server
%sed% -i 's/^\/\/ @host.*/\/\/ @host wuhan.escitycloud.com:8169/g' main.go
%sed% -i 's/^\/\/ @BasePath.*/\/\/ @BasePath \/miot\/platform\//g' main.go
:exit


